<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>EasyIO-GPRS-Framework: rtthread.h源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- 制作者 Doxygen 1.6.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="modules.html"><span>模块</span></a></li>
      <li><a href="annotated.html"><span>类</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <img id="MSearchSelect" src="search/search.png"
             onmouseover="return searchBox.OnSearchSelectShow()"
             onmouseout="return searchBox.OnSearchSelectHide()"
             alt=""/>
        <input type="text" id="MSearchField" value="搜索" accesskey="S"
             onfocus="searchBox.OnSearchFieldFocus(true)" 
             onblur="searchBox.OnSearchFieldFocus(false)" 
             onkeyup="searchBox.OnSearchFieldChange(event)"/>
        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>文件列表</span></a></li>
      <li><a href="globals.html"><span>文件成员</span></a></li>
    </ul>
  </div>
<h1>rtthread.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * File      : rtthread.h</span>
<a name="l00003"></a>00003 <span class="comment"> * This file is part of RT-Thread RTOS</span>
<a name="l00004"></a>00004 <span class="comment"> * COPYRIGHT (C) 2006 - 2012, RT-Thread Development Team</span>
<a name="l00005"></a>00005 <span class="comment"> *</span>
<a name="l00006"></a>00006 <span class="comment"> * The license and distribution terms for this file may be</span>
<a name="l00007"></a>00007 <span class="comment"> * found in the file LICENSE in this distribution or at</span>
<a name="l00008"></a>00008 <span class="comment"> * http://www.rt-thread.org/license/LICENSE</span>
<a name="l00009"></a>00009 <span class="comment"> *</span>
<a name="l00010"></a>00010 <span class="comment"> * Change Logs:</span>
<a name="l00011"></a>00011 <span class="comment"> * Date           Author       Notes</span>
<a name="l00012"></a>00012 <span class="comment"> * 2006-03-18     Bernard      the first version</span>
<a name="l00013"></a>00013 <span class="comment"> * 2006-04-26     Bernard      add semaphore APIs</span>
<a name="l00014"></a>00014 <span class="comment"> * 2006-08-10     Bernard      add version information</span>
<a name="l00015"></a>00015 <span class="comment"> * 2007-01-28     Bernard      rename RT_OBJECT_Class_Static to RT_Object_Class_Static</span>
<a name="l00016"></a>00016 <span class="comment"> * 2007-03-03     Bernard      clean up the definitions to rtdef.h</span>
<a name="l00017"></a>00017 <span class="comment"> * 2010-04-11     yi.qiu       add module feature</span>
<a name="l00018"></a>00018 <span class="comment"> */</span>
<a name="l00019"></a>00019 
<a name="l00020"></a>00020 <span class="preprocessor">#ifndef __RT_THREAD_H__</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#define __RT_THREAD_H__</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &lt;rtdef.h&gt;</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &lt;rtdebug.h&gt;</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include &lt;rtservice.h&gt;</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include &lt;rtm.h&gt;</span>
<a name="l00027"></a>00027 
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {
<a name="l00030"></a>00030 <span class="preprocessor">#endif</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span>
<a name="l00037"></a>00037 
<a name="l00038"></a>00038 <span class="comment">/*</span>
<a name="l00039"></a>00039 <span class="comment"> * kernel object interface</span>
<a name="l00040"></a>00040 <span class="comment"> */</span>
<a name="l00041"></a>00041 <span class="keywordtype">void</span> rt_system_object_init(<span class="keywordtype">void</span>);
<a name="l00042"></a>00042 <span class="keyword">struct </span><a class="code" href="structrt__object__information.html">rt_object_information</a> *
<a name="l00043"></a>00043 rt_object_get_information(<span class="keyword">enum</span> <a class="code" href="group__KernelObject.html#ga38a532bcb1bd3f12685db4219b761b56">rt_object_class_type</a> <a class="code" href="structrt__object__information.html#ade4fad90f69638200ccb2cbcc9f8e298">type</a>);
<a name="l00044"></a>00044 <span class="keywordtype">void</span> rt_object_init(<span class="keyword">struct</span> <a class="code" href="structrt__object.html">rt_object</a>         *<span class="keywordtype">object</span>,
<a name="l00045"></a>00045                     <span class="keyword">enum</span> <a class="code" href="group__KernelObject.html#ga38a532bcb1bd3f12685db4219b761b56">rt_object_class_type</a> <a class="code" href="structrt__object__information.html#ade4fad90f69638200ccb2cbcc9f8e298">type</a>,
<a name="l00046"></a>00046                     <span class="keyword">const</span> <span class="keywordtype">char</span>               *name);
<a name="l00047"></a>00047 <span class="keywordtype">void</span> rt_object_detach(<a class="code" href="structrt__object.html">rt_object_t</a> <span class="keywordtype">object</span>);
<a name="l00048"></a>00048 <a class="code" href="structrt__object.html">rt_object_t</a> rt_object_allocate(<span class="keyword">enum</span> <a class="code" href="group__KernelObject.html#ga38a532bcb1bd3f12685db4219b761b56">rt_object_class_type</a> <a class="code" href="structrt__object__information.html#ade4fad90f69638200ccb2cbcc9f8e298">type</a>,
<a name="l00049"></a>00049                                <span class="keyword">const</span> <span class="keywordtype">char</span>               *name);
<a name="l00050"></a>00050 <span class="keywordtype">void</span> rt_object_delete(<a class="code" href="structrt__object.html">rt_object_t</a> <span class="keywordtype">object</span>);
<a name="l00051"></a>00051 <a class="code" href="group__BasicDef.html#ga3e03a3519ef7e33d13ebd34c482db49c">rt_bool_t</a> rt_object_is_systemobject(<a class="code" href="structrt__object.html">rt_object_t</a> <span class="keywordtype">object</span>);
<a name="l00052"></a>00052 <a class="code" href="structrt__object.html">rt_object_t</a> rt_object_find(<span class="keyword">const</span> <span class="keywordtype">char</span> *name, <a class="code" href="group__BasicDef.html#ga585e2ad0fbab0f83817cb61373465df6">rt_uint8_t</a> <a class="code" href="structrt__object__information.html#ade4fad90f69638200ccb2cbcc9f8e298">type</a>);
<a name="l00053"></a>00053 
<a name="l00054"></a>00054 <span class="preprocessor">#ifdef RT_USING_HOOK</span>
<a name="l00055"></a>00055 <span class="preprocessor"></span><span class="keywordtype">void</span> rt_object_attach_sethook(<span class="keywordtype">void</span> (*hook)(<span class="keyword">struct</span> <a class="code" href="structrt__object.html">rt_object</a> *<span class="keywordtype">object</span>));
<a name="l00056"></a>00056 <span class="keywordtype">void</span> rt_object_detach_sethook(<span class="keywordtype">void</span> (*hook)(<span class="keyword">struct</span> <a class="code" href="structrt__object.html">rt_object</a> *<span class="keywordtype">object</span>));
<a name="l00057"></a>00057 <span class="keywordtype">void</span> rt_object_trytake_sethook(<span class="keywordtype">void</span> (*hook)(<span class="keyword">struct</span> <a class="code" href="structrt__object.html">rt_object</a> *<span class="keywordtype">object</span>));
<a name="l00058"></a>00058 <span class="keywordtype">void</span> rt_object_take_sethook(<span class="keywordtype">void</span> (*hook)(<span class="keyword">struct</span> <a class="code" href="structrt__object.html">rt_object</a> *<span class="keywordtype">object</span>));
<a name="l00059"></a>00059 <span class="keywordtype">void</span> rt_object_put_sethook(<span class="keywordtype">void</span> (*hook)(<span class="keyword">struct</span> <a class="code" href="structrt__object.html">rt_object</a> *<span class="keywordtype">object</span>));
<a name="l00060"></a>00060 <span class="preprocessor">#endif</span>
<a name="l00061"></a>00061 <span class="preprocessor"></span>
<a name="l00069"></a>00069 
<a name="l00070"></a>00070 <span class="comment">/*</span>
<a name="l00071"></a>00071 <span class="comment"> * clock &amp; timer interface</span>
<a name="l00072"></a>00072 <span class="comment"> */</span>
<a name="l00073"></a>00073 <span class="keywordtype">void</span> rt_system_tick_init(<span class="keywordtype">void</span>);
<a name="l00074"></a>00074 <a class="code" href="group__BasicDef.html#ga66c400929925784dba020d671154978a">rt_tick_t</a> rt_tick_get(<span class="keywordtype">void</span>);
<a name="l00075"></a>00075 <span class="keywordtype">void</span> rt_tick_set(<a class="code" href="group__BasicDef.html#ga66c400929925784dba020d671154978a">rt_tick_t</a> tick);
<a name="l00076"></a>00076 <span class="keywordtype">void</span> rt_tick_increase(<span class="keywordtype">void</span>);
<a name="l00077"></a>00077 <a class="code" href="group__BasicDef.html#ga66c400929925784dba020d671154978a">rt_tick_t</a> rt_tick_from_millisecond(<a class="code" href="group__BasicDef.html#ga909edcac80e5e3f93f63fcebc95922c7">rt_uint32_t</a> ms);
<a name="l00078"></a>00078 
<a name="l00079"></a>00079 <span class="keywordtype">void</span> rt_system_timer_init(<span class="keywordtype">void</span>);
<a name="l00080"></a>00080 <span class="keywordtype">void</span> rt_system_timer_thread_init(<span class="keywordtype">void</span>);
<a name="l00081"></a>00081 
<a name="l00082"></a>00082 <span class="keywordtype">void</span> rt_timer_init(<a class="code" href="structrt__timer.html">rt_timer_t</a>  timer,
<a name="l00083"></a>00083                    <span class="keyword">const</span> <span class="keywordtype">char</span> *name,
<a name="l00084"></a>00084                    <span class="keywordtype">void</span> (*timeout)(<span class="keywordtype">void</span> *parameter),
<a name="l00085"></a>00085                    <span class="keywordtype">void</span>       *parameter,
<a name="l00086"></a>00086                    <a class="code" href="group__BasicDef.html#ga66c400929925784dba020d671154978a">rt_tick_t</a>   time,
<a name="l00087"></a>00087                    <a class="code" href="group__BasicDef.html#ga585e2ad0fbab0f83817cb61373465df6">rt_uint8_t</a>  flag);
<a name="l00088"></a>00088 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_timer_detach(<a class="code" href="structrt__timer.html">rt_timer_t</a> timer);
<a name="l00089"></a>00089 <a class="code" href="structrt__timer.html">rt_timer_t</a> rt_timer_create(<span class="keyword">const</span> <span class="keywordtype">char</span> *name,
<a name="l00090"></a>00090                            <span class="keywordtype">void</span> (*timeout)(<span class="keywordtype">void</span> *parameter),
<a name="l00091"></a>00091                            <span class="keywordtype">void</span>       *parameter,
<a name="l00092"></a>00092                            <a class="code" href="group__BasicDef.html#ga66c400929925784dba020d671154978a">rt_tick_t</a>   time,
<a name="l00093"></a>00093                            <a class="code" href="group__BasicDef.html#ga585e2ad0fbab0f83817cb61373465df6">rt_uint8_t</a>  flag);
<a name="l00094"></a>00094 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_timer_delete(<a class="code" href="structrt__timer.html">rt_timer_t</a> timer);
<a name="l00095"></a>00095 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_timer_start(<a class="code" href="structrt__timer.html">rt_timer_t</a> timer);
<a name="l00096"></a>00096 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_timer_stop(<a class="code" href="structrt__timer.html">rt_timer_t</a> timer);
<a name="l00097"></a>00097 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_timer_control(<a class="code" href="structrt__timer.html">rt_timer_t</a> timer, <a class="code" href="group__BasicDef.html#ga585e2ad0fbab0f83817cb61373465df6">rt_uint8_t</a> cmd, <span class="keywordtype">void</span> *arg);
<a name="l00098"></a>00098 
<a name="l00099"></a>00099 <a class="code" href="group__BasicDef.html#ga66c400929925784dba020d671154978a">rt_tick_t</a> rt_timer_next_timeout_tick(<span class="keywordtype">void</span>);
<a name="l00100"></a>00100 <span class="keywordtype">void</span> rt_timer_check(<span class="keywordtype">void</span>);
<a name="l00101"></a>00101 
<a name="l00102"></a>00102 <span class="preprocessor">#ifdef RT_USING_HOOK</span>
<a name="l00103"></a>00103 <span class="preprocessor"></span><span class="keywordtype">void</span> rt_timer_timeout_sethook(<span class="keywordtype">void</span> (*hook)(<span class="keyword">struct</span> <a class="code" href="structrt__timer.html">rt_timer</a> *timer));
<a name="l00104"></a>00104 <span class="preprocessor">#endif</span>
<a name="l00105"></a>00105 <span class="preprocessor"></span>
<a name="l00113"></a>00113 
<a name="l00114"></a>00114 <span class="comment">/*</span>
<a name="l00115"></a>00115 <span class="comment"> * thread interface</span>
<a name="l00116"></a>00116 <span class="comment"> */</span>
<a name="l00117"></a>00117 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_thread_init(<span class="keyword">struct</span> <a class="code" href="structrt__thread.html">rt_thread</a> *thread,
<a name="l00118"></a>00118                         <span class="keyword">const</span> <span class="keywordtype">char</span>       *name,
<a name="l00119"></a>00119                         <span class="keywordtype">void</span> (*entry)(<span class="keywordtype">void</span> *parameter),
<a name="l00120"></a>00120                         <span class="keywordtype">void</span>             *parameter,
<a name="l00121"></a>00121                         <span class="keywordtype">void</span>             *stack_start,
<a name="l00122"></a>00122                         <a class="code" href="group__BasicDef.html#ga909edcac80e5e3f93f63fcebc95922c7">rt_uint32_t</a>       stack_size,
<a name="l00123"></a>00123                         <a class="code" href="group__BasicDef.html#ga585e2ad0fbab0f83817cb61373465df6">rt_uint8_t</a>        priority,
<a name="l00124"></a>00124                         <a class="code" href="group__BasicDef.html#ga909edcac80e5e3f93f63fcebc95922c7">rt_uint32_t</a>       tick);
<a name="l00125"></a>00125 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_thread_detach(<a class="code" href="structrt__thread.html">rt_thread_t</a> thread);
<a name="l00126"></a>00126 <a class="code" href="structrt__thread.html">rt_thread_t</a> rt_thread_create(<span class="keyword">const</span> <span class="keywordtype">char</span> *name,
<a name="l00127"></a>00127                              <span class="keywordtype">void</span> (*entry)(<span class="keywordtype">void</span> *parameter),
<a name="l00128"></a>00128                              <span class="keywordtype">void</span>       *parameter,
<a name="l00129"></a>00129                              <a class="code" href="group__BasicDef.html#ga909edcac80e5e3f93f63fcebc95922c7">rt_uint32_t</a> stack_size,
<a name="l00130"></a>00130                              <a class="code" href="group__BasicDef.html#ga585e2ad0fbab0f83817cb61373465df6">rt_uint8_t</a>  priority,
<a name="l00131"></a>00131                              <a class="code" href="group__BasicDef.html#ga909edcac80e5e3f93f63fcebc95922c7">rt_uint32_t</a> tick);
<a name="l00132"></a>00132 <a class="code" href="structrt__thread.html">rt_thread_t</a> rt_thread_self(<span class="keywordtype">void</span>);
<a name="l00133"></a>00133 <a class="code" href="structrt__thread.html">rt_thread_t</a> rt_thread_find(<span class="keywordtype">char</span> *name);
<a name="l00134"></a>00134 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_thread_startup(<a class="code" href="structrt__thread.html">rt_thread_t</a> thread);
<a name="l00135"></a>00135 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_thread_delete(<a class="code" href="structrt__thread.html">rt_thread_t</a> thread);
<a name="l00136"></a>00136 
<a name="l00137"></a>00137 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_thread_yield(<span class="keywordtype">void</span>);
<a name="l00138"></a>00138 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_thread_delay(<a class="code" href="group__BasicDef.html#ga66c400929925784dba020d671154978a">rt_tick_t</a> tick);
<a name="l00139"></a>00139 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_thread_control(<a class="code" href="structrt__thread.html">rt_thread_t</a> thread, <a class="code" href="group__BasicDef.html#ga585e2ad0fbab0f83817cb61373465df6">rt_uint8_t</a> cmd, <span class="keywordtype">void</span> *arg);
<a name="l00140"></a>00140 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_thread_suspend(<a class="code" href="structrt__thread.html">rt_thread_t</a> thread);
<a name="l00141"></a>00141 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_thread_resume(<a class="code" href="structrt__thread.html">rt_thread_t</a> thread);
<a name="l00142"></a>00142 <span class="keywordtype">void</span> rt_thread_timeout(<span class="keywordtype">void</span> *parameter);
<a name="l00143"></a>00143 
<a name="l00144"></a>00144 <span class="comment">/*</span>
<a name="l00145"></a>00145 <span class="comment"> * idle thread interface</span>
<a name="l00146"></a>00146 <span class="comment"> */</span>
<a name="l00147"></a>00147 <span class="keywordtype">void</span> rt_thread_idle_init(<span class="keywordtype">void</span>);
<a name="l00148"></a>00148 <span class="preprocessor">#ifdef RT_USING_HOOK</span>
<a name="l00149"></a>00149 <span class="preprocessor"></span><span class="keywordtype">void</span> rt_thread_idle_sethook(<span class="keywordtype">void</span> (*hook)(<span class="keywordtype">void</span>));
<a name="l00150"></a>00150 <span class="preprocessor">#endif</span>
<a name="l00151"></a>00151 <span class="preprocessor"></span><span class="keywordtype">void</span> rt_thread_idle_excute(<span class="keywordtype">void</span>);
<a name="l00152"></a>00152 
<a name="l00153"></a>00153 <span class="comment">/*</span>
<a name="l00154"></a>00154 <span class="comment"> * schedule service</span>
<a name="l00155"></a>00155 <span class="comment"> */</span>
<a name="l00156"></a>00156 <span class="keywordtype">void</span> rt_system_scheduler_init(<span class="keywordtype">void</span>);
<a name="l00157"></a>00157 <span class="keywordtype">void</span> rt_system_scheduler_start(<span class="keywordtype">void</span>);
<a name="l00158"></a>00158 
<a name="l00159"></a>00159 <span class="keywordtype">void</span> rt_schedule(<span class="keywordtype">void</span>);
<a name="l00160"></a>00160 <span class="keywordtype">void</span> rt_schedule_insert_thread(<span class="keyword">struct</span> <a class="code" href="structrt__thread.html">rt_thread</a> *thread);
<a name="l00161"></a>00161 <span class="keywordtype">void</span> rt_schedule_remove_thread(<span class="keyword">struct</span> <a class="code" href="structrt__thread.html">rt_thread</a> *thread);
<a name="l00162"></a>00162 
<a name="l00163"></a>00163 <span class="keywordtype">void</span> rt_enter_critical(<span class="keywordtype">void</span>);
<a name="l00164"></a>00164 <span class="keywordtype">void</span> rt_exit_critical(<span class="keywordtype">void</span>);
<a name="l00165"></a>00165 
<a name="l00166"></a>00166 <span class="preprocessor">#ifdef RT_USING_HOOK</span>
<a name="l00167"></a>00167 <span class="preprocessor"></span><span class="keywordtype">void</span> rt_scheduler_sethook(<span class="keywordtype">void</span> (*hook)(<a class="code" href="structrt__thread.html">rt_thread_t</a> from, <a class="code" href="structrt__thread.html">rt_thread_t</a> to));
<a name="l00168"></a>00168 <span class="preprocessor">#endif</span>
<a name="l00169"></a>00169 <span class="preprocessor"></span>
<a name="l00177"></a>00177 
<a name="l00178"></a>00178 <span class="comment">/*</span>
<a name="l00179"></a>00179 <span class="comment"> * memory management interface</span>
<a name="l00180"></a>00180 <span class="comment"> */</span>
<a name="l00181"></a>00181 <span class="preprocessor">#ifdef RT_USING_MEMPOOL</span>
<a name="l00182"></a>00182 <span class="preprocessor"></span><span class="comment">/*</span>
<a name="l00183"></a>00183 <span class="comment"> * memory pool interface</span>
<a name="l00184"></a>00184 <span class="comment"> */</span>
<a name="l00185"></a>00185 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_mp_init(<span class="keyword">struct</span> rt_mempool *mp,
<a name="l00186"></a>00186                     <span class="keyword">const</span> <span class="keywordtype">char</span>        *name,
<a name="l00187"></a>00187                     <span class="keywordtype">void</span>              *start,
<a name="l00188"></a>00188                     <a class="code" href="group__BasicDef.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a>          size,
<a name="l00189"></a>00189                     <a class="code" href="group__BasicDef.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a>          block_size);
<a name="l00190"></a>00190 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_mp_detach(<span class="keyword">struct</span> rt_mempool *mp);
<a name="l00191"></a>00191 rt_mp_t rt_mp_create(<span class="keyword">const</span> <span class="keywordtype">char</span> *name,
<a name="l00192"></a>00192                      <a class="code" href="group__BasicDef.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a>   block_count,
<a name="l00193"></a>00193                      <a class="code" href="group__BasicDef.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a>   block_size);
<a name="l00194"></a>00194 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_mp_delete(rt_mp_t mp);
<a name="l00195"></a>00195 
<a name="l00196"></a>00196 <span class="keywordtype">void</span> *rt_mp_alloc(rt_mp_t mp, <a class="code" href="group__BasicDef.html#gae5c6ccee15f067714ca9c44e509c4047">rt_int32_t</a> time);
<a name="l00197"></a>00197 <span class="keywordtype">void</span> rt_mp_free(<span class="keywordtype">void</span> *block);
<a name="l00198"></a>00198 
<a name="l00199"></a>00199 <span class="preprocessor">#ifdef RT_USING_HOOK</span>
<a name="l00200"></a>00200 <span class="preprocessor"></span><span class="keywordtype">void</span> rt_mp_alloc_sethook(<span class="keywordtype">void</span> (*hook)(<span class="keyword">struct</span> rt_mempool *mp, <span class="keywordtype">void</span> *block));
<a name="l00201"></a>00201 <span class="keywordtype">void</span> rt_mp_free_sethook(<span class="keywordtype">void</span> (*hook)(<span class="keyword">struct</span> rt_mempool *mp, <span class="keywordtype">void</span> *block));
<a name="l00202"></a>00202 <span class="preprocessor">#endif</span>
<a name="l00203"></a>00203 <span class="preprocessor"></span>
<a name="l00204"></a>00204 <span class="preprocessor">#endif</span>
<a name="l00205"></a>00205 <span class="preprocessor"></span>
<a name="l00206"></a>00206 <span class="preprocessor">#ifdef RT_USING_HEAP</span>
<a name="l00207"></a>00207 <span class="preprocessor"></span><span class="comment">/*</span>
<a name="l00208"></a>00208 <span class="comment"> * heap memory interface</span>
<a name="l00209"></a>00209 <span class="comment"> */</span>
<a name="l00210"></a>00210 <span class="keywordtype">void</span> rt_system_heap_init(<span class="keywordtype">void</span> *begin_addr, <span class="keywordtype">void</span> *end_addr);
<a name="l00211"></a>00211 
<a name="l00212"></a>00212 <span class="keywordtype">void</span> *rt_malloc(<a class="code" href="group__BasicDef.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a> nbytes);
<a name="l00213"></a>00213 <span class="keywordtype">void</span> rt_free(<span class="keywordtype">void</span> *ptr);
<a name="l00214"></a>00214 <span class="keywordtype">void</span> *rt_realloc(<span class="keywordtype">void</span> *ptr, <a class="code" href="group__BasicDef.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a> nbytes);
<a name="l00215"></a>00215 <span class="keywordtype">void</span> *rt_calloc(<a class="code" href="group__BasicDef.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a> count, <a class="code" href="group__BasicDef.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a> size);
<a name="l00216"></a>00216 <span class="keywordtype">void</span> *rt_malloc_align(<a class="code" href="group__BasicDef.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a> size, <a class="code" href="group__BasicDef.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a> align);
<a name="l00217"></a>00217 <span class="keywordtype">void</span> rt_free_align(<span class="keywordtype">void</span> *ptr);
<a name="l00218"></a>00218 
<a name="l00219"></a>00219 <span class="keywordtype">void</span> rt_memory_info(<a class="code" href="group__BasicDef.html#ga909edcac80e5e3f93f63fcebc95922c7">rt_uint32_t</a> *total,
<a name="l00220"></a>00220                     <a class="code" href="group__BasicDef.html#ga909edcac80e5e3f93f63fcebc95922c7">rt_uint32_t</a> *used,
<a name="l00221"></a>00221                     <a class="code" href="group__BasicDef.html#ga909edcac80e5e3f93f63fcebc95922c7">rt_uint32_t</a> *max_used);
<a name="l00222"></a>00222 
<a name="l00223"></a>00223 <span class="preprocessor">#ifdef RT_USING_SLAB</span>
<a name="l00224"></a>00224 <span class="preprocessor"></span><span class="keywordtype">void</span> *rt_page_alloc(<a class="code" href="group__BasicDef.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a> npages);
<a name="l00225"></a>00225 <span class="keywordtype">void</span> rt_page_free(<span class="keywordtype">void</span> *addr, <a class="code" href="group__BasicDef.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a> npages);
<a name="l00226"></a>00226 <span class="preprocessor">#endif</span>
<a name="l00227"></a>00227 <span class="preprocessor"></span>
<a name="l00228"></a>00228 <span class="preprocessor">#ifdef RT_USING_HOOK</span>
<a name="l00229"></a>00229 <span class="preprocessor"></span><span class="keywordtype">void</span> rt_malloc_sethook(<span class="keywordtype">void</span> (*hook)(<span class="keywordtype">void</span> *ptr, <a class="code" href="group__BasicDef.html#ga909edcac80e5e3f93f63fcebc95922c7">rt_uint32_t</a> size));
<a name="l00230"></a>00230 <span class="keywordtype">void</span> rt_free_sethook(<span class="keywordtype">void</span> (*hook)(<span class="keywordtype">void</span> *ptr));
<a name="l00231"></a>00231 <span class="preprocessor">#endif</span>
<a name="l00232"></a>00232 <span class="preprocessor"></span>
<a name="l00233"></a>00233 <span class="preprocessor">#endif</span>
<a name="l00234"></a>00234 <span class="preprocessor"></span>
<a name="l00235"></a>00235 <span class="preprocessor">#ifdef RT_USING_MEMHEAP</span>
<a name="l00236"></a>00236 <span class="preprocessor"></span>
<a name="l00239"></a>00239 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_memheap_init(<span class="keyword">struct</span> rt_memheap *memheap,
<a name="l00240"></a>00240                          <span class="keyword">const</span> <span class="keywordtype">char</span>        *name,
<a name="l00241"></a>00241                          <span class="keywordtype">void</span>              *start_addr,
<a name="l00242"></a>00242                          <a class="code" href="group__BasicDef.html#ga909edcac80e5e3f93f63fcebc95922c7">rt_uint32_t</a>        size);
<a name="l00243"></a>00243 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_memheap_detach(<span class="keyword">struct</span> rt_memheap *heap);
<a name="l00244"></a>00244 <span class="keywordtype">void</span>* rt_memheap_alloc(<span class="keyword">struct</span> rt_memheap *heap, <a class="code" href="group__BasicDef.html#ga909edcac80e5e3f93f63fcebc95922c7">rt_uint32_t</a> size);
<a name="l00245"></a>00245 <span class="keywordtype">void</span> rt_memheap_free(<span class="keywordtype">void</span> *ptr);
<a name="l00246"></a>00246 <span class="preprocessor">#endif</span>
<a name="l00247"></a>00247 <span class="preprocessor"></span>
<a name="l00255"></a>00255 
<a name="l00256"></a>00256 <span class="preprocessor">#ifdef RT_USING_SEMAPHORE</span>
<a name="l00257"></a>00257 <span class="preprocessor"></span><span class="comment">/*</span>
<a name="l00258"></a>00258 <span class="comment"> * semaphore interface</span>
<a name="l00259"></a>00259 <span class="comment"> */</span>
<a name="l00260"></a>00260 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_sem_init(rt_sem_t    sem,
<a name="l00261"></a>00261                      <span class="keyword">const</span> <span class="keywordtype">char</span> *name,
<a name="l00262"></a>00262                      <a class="code" href="group__BasicDef.html#ga909edcac80e5e3f93f63fcebc95922c7">rt_uint32_t</a> value,
<a name="l00263"></a>00263                      <a class="code" href="group__BasicDef.html#ga585e2ad0fbab0f83817cb61373465df6">rt_uint8_t</a>  flag);
<a name="l00264"></a>00264 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_sem_detach(rt_sem_t sem);
<a name="l00265"></a>00265 rt_sem_t rt_sem_create(<span class="keyword">const</span> <span class="keywordtype">char</span> *name, <a class="code" href="group__BasicDef.html#ga909edcac80e5e3f93f63fcebc95922c7">rt_uint32_t</a> value, <a class="code" href="group__BasicDef.html#ga585e2ad0fbab0f83817cb61373465df6">rt_uint8_t</a> flag);
<a name="l00266"></a>00266 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_sem_delete(rt_sem_t sem);
<a name="l00267"></a>00267 
<a name="l00268"></a>00268 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_sem_take(rt_sem_t sem, <a class="code" href="group__BasicDef.html#gae5c6ccee15f067714ca9c44e509c4047">rt_int32_t</a> time);
<a name="l00269"></a>00269 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_sem_trytake(rt_sem_t sem);
<a name="l00270"></a>00270 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_sem_release(rt_sem_t sem);
<a name="l00271"></a>00271 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_sem_control(rt_sem_t sem, <a class="code" href="group__BasicDef.html#ga585e2ad0fbab0f83817cb61373465df6">rt_uint8_t</a> cmd, <span class="keywordtype">void</span> *arg);
<a name="l00272"></a>00272 <span class="preprocessor">#endif</span>
<a name="l00273"></a>00273 <span class="preprocessor"></span>
<a name="l00274"></a>00274 <span class="preprocessor">#ifdef RT_USING_MUTEX</span>
<a name="l00275"></a>00275 <span class="preprocessor"></span><span class="comment">/*</span>
<a name="l00276"></a>00276 <span class="comment"> * mutex interface</span>
<a name="l00277"></a>00277 <span class="comment"> */</span>
<a name="l00278"></a>00278 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_mutex_init(rt_mutex_t mutex, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <a class="code" href="group__BasicDef.html#ga585e2ad0fbab0f83817cb61373465df6">rt_uint8_t</a> flag);
<a name="l00279"></a>00279 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_mutex_detach(rt_mutex_t mutex);
<a name="l00280"></a>00280 rt_mutex_t rt_mutex_create(<span class="keyword">const</span> <span class="keywordtype">char</span> *name, <a class="code" href="group__BasicDef.html#ga585e2ad0fbab0f83817cb61373465df6">rt_uint8_t</a> flag);
<a name="l00281"></a>00281 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_mutex_delete(rt_mutex_t mutex);
<a name="l00282"></a>00282 
<a name="l00283"></a>00283 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_mutex_take(rt_mutex_t mutex, <a class="code" href="group__BasicDef.html#gae5c6ccee15f067714ca9c44e509c4047">rt_int32_t</a> time);
<a name="l00284"></a>00284 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_mutex_release(rt_mutex_t mutex);
<a name="l00285"></a>00285 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_mutex_control(rt_mutex_t mutex, <a class="code" href="group__BasicDef.html#ga585e2ad0fbab0f83817cb61373465df6">rt_uint8_t</a> cmd, <span class="keywordtype">void</span> *arg);
<a name="l00286"></a>00286 <span class="preprocessor">#endif</span>
<a name="l00287"></a>00287 <span class="preprocessor"></span>
<a name="l00288"></a>00288 <span class="preprocessor">#ifdef RT_USING_EVENT</span>
<a name="l00289"></a>00289 <span class="preprocessor"></span><span class="comment">/*</span>
<a name="l00290"></a>00290 <span class="comment"> * event interface</span>
<a name="l00291"></a>00291 <span class="comment"> */</span>
<a name="l00292"></a>00292 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_event_init(rt_event_t event, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <a class="code" href="group__BasicDef.html#ga585e2ad0fbab0f83817cb61373465df6">rt_uint8_t</a> flag);
<a name="l00293"></a>00293 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_event_detach(rt_event_t event);
<a name="l00294"></a>00294 rt_event_t rt_event_create(<span class="keyword">const</span> <span class="keywordtype">char</span> *name, <a class="code" href="group__BasicDef.html#ga585e2ad0fbab0f83817cb61373465df6">rt_uint8_t</a> flag);
<a name="l00295"></a>00295 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_event_delete(rt_event_t event);
<a name="l00296"></a>00296 
<a name="l00297"></a>00297 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_event_send(rt_event_t event, <a class="code" href="group__BasicDef.html#ga909edcac80e5e3f93f63fcebc95922c7">rt_uint32_t</a> <span class="keyword">set</span>);
<a name="l00298"></a>00298 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_event_recv(rt_event_t   event,
<a name="l00299"></a>00299                        <a class="code" href="group__BasicDef.html#ga909edcac80e5e3f93f63fcebc95922c7">rt_uint32_t</a>  <span class="keyword">set</span>,
<a name="l00300"></a>00300                        <a class="code" href="group__BasicDef.html#ga585e2ad0fbab0f83817cb61373465df6">rt_uint8_t</a>   opt,
<a name="l00301"></a>00301                        <a class="code" href="group__BasicDef.html#gae5c6ccee15f067714ca9c44e509c4047">rt_int32_t</a>   timeout,
<a name="l00302"></a>00302                        <a class="code" href="group__BasicDef.html#ga909edcac80e5e3f93f63fcebc95922c7">rt_uint32_t</a> *recved);
<a name="l00303"></a>00303 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_event_control(rt_event_t event, <a class="code" href="group__BasicDef.html#ga585e2ad0fbab0f83817cb61373465df6">rt_uint8_t</a> cmd, <span class="keywordtype">void</span> *arg);
<a name="l00304"></a>00304 <span class="preprocessor">#endif</span>
<a name="l00305"></a>00305 <span class="preprocessor"></span>
<a name="l00306"></a>00306 <span class="preprocessor">#ifdef RT_USING_MAILBOX</span>
<a name="l00307"></a>00307 <span class="preprocessor"></span><span class="comment">/*</span>
<a name="l00308"></a>00308 <span class="comment"> * mailbox interface</span>
<a name="l00309"></a>00309 <span class="comment"> */</span>
<a name="l00310"></a>00310 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_mb_init(rt_mailbox_t mb,
<a name="l00311"></a>00311                     <span class="keyword">const</span> <span class="keywordtype">char</span>  *name,
<a name="l00312"></a>00312                     <span class="keywordtype">void</span>        *msgpool,
<a name="l00313"></a>00313                     <a class="code" href="group__BasicDef.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a>    size,
<a name="l00314"></a>00314                     <a class="code" href="group__BasicDef.html#ga585e2ad0fbab0f83817cb61373465df6">rt_uint8_t</a>   flag);
<a name="l00315"></a>00315 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_mb_detach(rt_mailbox_t mb);
<a name="l00316"></a>00316 rt_mailbox_t rt_mb_create(<span class="keyword">const</span> <span class="keywordtype">char</span> *name, <a class="code" href="group__BasicDef.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a> size, <a class="code" href="group__BasicDef.html#ga585e2ad0fbab0f83817cb61373465df6">rt_uint8_t</a> flag);
<a name="l00317"></a>00317 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_mb_delete(rt_mailbox_t mb);
<a name="l00318"></a>00318 
<a name="l00319"></a>00319 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_mb_send(rt_mailbox_t mb, <a class="code" href="group__BasicDef.html#ga909edcac80e5e3f93f63fcebc95922c7">rt_uint32_t</a> value);
<a name="l00320"></a>00320 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_mb_send_wait(rt_mailbox_t mb,
<a name="l00321"></a>00321                          <a class="code" href="group__BasicDef.html#ga909edcac80e5e3f93f63fcebc95922c7">rt_uint32_t</a>  value,
<a name="l00322"></a>00322                          <a class="code" href="group__BasicDef.html#gae5c6ccee15f067714ca9c44e509c4047">rt_int32_t</a>   timeout);
<a name="l00323"></a>00323 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_mb_recv(rt_mailbox_t mb, <a class="code" href="group__BasicDef.html#ga909edcac80e5e3f93f63fcebc95922c7">rt_uint32_t</a> *value, <a class="code" href="group__BasicDef.html#gae5c6ccee15f067714ca9c44e509c4047">rt_int32_t</a> timeout);
<a name="l00324"></a>00324 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_mb_control(rt_mailbox_t mb, <a class="code" href="group__BasicDef.html#ga585e2ad0fbab0f83817cb61373465df6">rt_uint8_t</a> cmd, <span class="keywordtype">void</span> *arg);
<a name="l00325"></a>00325 <span class="preprocessor">#endif</span>
<a name="l00326"></a>00326 <span class="preprocessor"></span>
<a name="l00327"></a>00327 <span class="preprocessor">#ifdef RT_USING_MESSAGEQUEUE</span>
<a name="l00328"></a>00328 <span class="preprocessor"></span><span class="comment">/*</span>
<a name="l00329"></a>00329 <span class="comment"> * message queue interface</span>
<a name="l00330"></a>00330 <span class="comment"> */</span>
<a name="l00331"></a>00331 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_mq_init(rt_mq_t     mq,
<a name="l00332"></a>00332                     <span class="keyword">const</span> <span class="keywordtype">char</span> *name,
<a name="l00333"></a>00333                     <span class="keywordtype">void</span>       *msgpool,
<a name="l00334"></a>00334                     <a class="code" href="group__BasicDef.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a>   msg_size,
<a name="l00335"></a>00335                     <a class="code" href="group__BasicDef.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a>   pool_size,
<a name="l00336"></a>00336                     <a class="code" href="group__BasicDef.html#ga585e2ad0fbab0f83817cb61373465df6">rt_uint8_t</a>  flag);
<a name="l00337"></a>00337 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_mq_detach(rt_mq_t mq);
<a name="l00338"></a>00338 rt_mq_t rt_mq_create(<span class="keyword">const</span> <span class="keywordtype">char</span> *name,
<a name="l00339"></a>00339                      <a class="code" href="group__BasicDef.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a>   msg_size,
<a name="l00340"></a>00340                      <a class="code" href="group__BasicDef.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a>   max_msgs,
<a name="l00341"></a>00341                      <a class="code" href="group__BasicDef.html#ga585e2ad0fbab0f83817cb61373465df6">rt_uint8_t</a>  flag);
<a name="l00342"></a>00342 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_mq_delete(rt_mq_t mq);
<a name="l00343"></a>00343 
<a name="l00344"></a>00344 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_mq_send(rt_mq_t mq, <span class="keywordtype">void</span> *buffer, <a class="code" href="group__BasicDef.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a> size);
<a name="l00345"></a>00345 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_mq_urgent(rt_mq_t mq, <span class="keywordtype">void</span> *buffer, <a class="code" href="group__BasicDef.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a> size);
<a name="l00346"></a>00346 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_mq_recv(rt_mq_t    mq,
<a name="l00347"></a>00347                     <span class="keywordtype">void</span>      *buffer,
<a name="l00348"></a>00348                     <a class="code" href="group__BasicDef.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a>  size,
<a name="l00349"></a>00349                     <a class="code" href="group__BasicDef.html#gae5c6ccee15f067714ca9c44e509c4047">rt_int32_t</a> timeout);
<a name="l00350"></a>00350 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_mq_control(rt_mq_t mq, <a class="code" href="group__BasicDef.html#ga585e2ad0fbab0f83817cb61373465df6">rt_uint8_t</a> cmd, <span class="keywordtype">void</span> *arg);
<a name="l00351"></a>00351 <span class="preprocessor">#endif</span>
<a name="l00352"></a>00352 <span class="preprocessor"></span>
<a name="l00355"></a>00355 <span class="preprocessor">#ifdef RT_USING_DEVICE</span>
<a name="l00356"></a>00356 <span class="preprocessor"></span>
<a name="l00361"></a>00361 
<a name="l00362"></a>00362 <span class="comment">/*</span>
<a name="l00363"></a>00363 <span class="comment"> * device (I/O) system interface</span>
<a name="l00364"></a>00364 <span class="comment"> */</span>
<a name="l00365"></a>00365 rt_device_t rt_device_find(<span class="keyword">const</span> <span class="keywordtype">char</span> *name);
<a name="l00366"></a>00366 
<a name="l00367"></a>00367 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_device_register(rt_device_t dev,
<a name="l00368"></a>00368                             <span class="keyword">const</span> <span class="keywordtype">char</span> *name,
<a name="l00369"></a>00369                             <a class="code" href="group__BasicDef.html#ga5acba55f46553417996ac70828b874da">rt_uint16_t</a> flags);
<a name="l00370"></a>00370 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_device_unregister(rt_device_t dev);
<a name="l00371"></a>00371 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_device_init_all(<span class="keywordtype">void</span>);
<a name="l00372"></a>00372 
<a name="l00373"></a>00373 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a>
<a name="l00374"></a>00374 rt_device_set_rx_indicate(rt_device_t dev,
<a name="l00375"></a>00375                           <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> (*rx_ind)(rt_device_t dev, <a class="code" href="group__BasicDef.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a> size));
<a name="l00376"></a>00376 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a>
<a name="l00377"></a>00377 rt_device_set_tx_complete(rt_device_t dev,
<a name="l00378"></a>00378                           <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> (*tx_done)(rt_device_t dev, <span class="keywordtype">void</span> *buffer));
<a name="l00379"></a>00379 
<a name="l00380"></a>00380 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a>  rt_device_init (rt_device_t dev);
<a name="l00381"></a>00381 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a>  rt_device_open (rt_device_t dev, <a class="code" href="group__BasicDef.html#ga5acba55f46553417996ac70828b874da">rt_uint16_t</a> oflag);
<a name="l00382"></a>00382 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a>  rt_device_close(rt_device_t dev);
<a name="l00383"></a>00383 <a class="code" href="group__BasicDef.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a> rt_device_read (rt_device_t dev,
<a name="l00384"></a>00384                           <a class="code" href="group__BasicDef.html#ga0fd4981851ce935649b6723a81f2f1bf">rt_off_t</a>    pos,
<a name="l00385"></a>00385                           <span class="keywordtype">void</span>       *buffer,
<a name="l00386"></a>00386                           <a class="code" href="group__BasicDef.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a>   size);
<a name="l00387"></a>00387 <a class="code" href="group__BasicDef.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a> rt_device_write(rt_device_t dev,
<a name="l00388"></a>00388                           <a class="code" href="group__BasicDef.html#ga0fd4981851ce935649b6723a81f2f1bf">rt_off_t</a>    pos,
<a name="l00389"></a>00389                           <span class="keyword">const</span> <span class="keywordtype">void</span> *buffer,
<a name="l00390"></a>00390                           <a class="code" href="group__BasicDef.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a>   size);
<a name="l00391"></a>00391 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a>  rt_device_control(rt_device_t dev, <a class="code" href="group__BasicDef.html#ga585e2ad0fbab0f83817cb61373465df6">rt_uint8_t</a> cmd, <span class="keywordtype">void</span> *arg);
<a name="l00392"></a>00392 
<a name="l00394"></a>00394 <span class="preprocessor">#endif</span>
<a name="l00395"></a>00395 <span class="preprocessor"></span>
<a name="l00396"></a>00396 <span class="preprocessor">#ifdef RT_USING_MODULE</span>
<a name="l00397"></a>00397 <span class="preprocessor"></span>
<a name="l00402"></a>00402 
<a name="l00403"></a>00403 <span class="comment">/*</span>
<a name="l00404"></a>00404 <span class="comment"> * module interface</span>
<a name="l00405"></a>00405 <span class="comment"> */</span>
<a name="l00406"></a>00406 rt_module_t rt_module_load(<span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keywordtype">void</span> *module_ptr);
<a name="l00407"></a>00407 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_module_unload(rt_module_t module);
<a name="l00408"></a>00408 <span class="preprocessor">#ifdef RT_USING_DFS</span>
<a name="l00409"></a>00409 <span class="preprocessor"></span>rt_module_t rt_module_open(<span class="keyword">const</span> <span class="keywordtype">char</span> *filename);
<a name="l00410"></a>00410 <span class="preprocessor">#endif</span>
<a name="l00411"></a>00411 <span class="preprocessor"></span><span class="keywordtype">void</span> *rt_module_malloc(<a class="code" href="group__BasicDef.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a> size);
<a name="l00412"></a>00412 <span class="keywordtype">void</span> *rt_module_realloc(<span class="keywordtype">void</span> *ptr, <a class="code" href="group__BasicDef.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a> size);
<a name="l00413"></a>00413 <span class="keywordtype">void</span> rt_module_free(rt_module_t module, <span class="keywordtype">void</span> *addr);
<a name="l00414"></a>00414 rt_module_t rt_module_self(<span class="keywordtype">void</span>);
<a name="l00415"></a>00415 rt_module_t rt_module_find(<span class="keyword">const</span> <span class="keywordtype">char</span> *name);
<a name="l00416"></a>00416 
<a name="l00417"></a>00417 <span class="preprocessor">#ifdef RT_USING_HOOK</span>
<a name="l00418"></a>00418 <span class="preprocessor"></span><span class="keywordtype">void</span> rt_module_load_sethook(<span class="keywordtype">void</span> (*hook)(rt_module_t module));
<a name="l00419"></a>00419 <span class="keywordtype">void</span> rt_module_unload_sethook(<span class="keywordtype">void</span> (*hook)(rt_module_t module));
<a name="l00420"></a>00420 <span class="preprocessor">#endif</span>
<a name="l00421"></a>00421 <span class="preprocessor"></span>
<a name="l00423"></a>00423 <span class="preprocessor">#endif</span>
<a name="l00424"></a>00424 <span class="preprocessor"></span> 
<a name="l00425"></a>00425 <span class="comment">/*</span>
<a name="l00426"></a>00426 <span class="comment"> * interrupt service</span>
<a name="l00427"></a>00427 <span class="comment"> */</span>
<a name="l00428"></a>00428 <span class="keyword">typedef</span> void (*rt_isr_handler_t)(<span class="keywordtype">int</span> vector);
<a name="l00429"></a>00429 
<a name="l00430"></a>00430 <span class="comment">/*</span>
<a name="l00431"></a>00431 <span class="comment"> * rt_interrupt_enter and rt_interrupt_leave only can be called by BSP</span>
<a name="l00432"></a>00432 <span class="comment"> */</span>
<a name="l00433"></a>00433 <span class="keywordtype">void</span> rt_interrupt_enter(<span class="keywordtype">void</span>);
<a name="l00434"></a>00434 <span class="keywordtype">void</span> rt_interrupt_leave(<span class="keywordtype">void</span>);
<a name="l00435"></a>00435 
<a name="l00436"></a>00436 <span class="comment">/*</span>
<a name="l00437"></a>00437 <span class="comment"> * the number of nested interrupts.</span>
<a name="l00438"></a>00438 <span class="comment"> */</span>
<a name="l00439"></a>00439 <a class="code" href="group__BasicDef.html#ga585e2ad0fbab0f83817cb61373465df6">rt_uint8_t</a> rt_interrupt_get_nest(<span class="keywordtype">void</span>);
<a name="l00440"></a>00440 
<a name="l00444"></a>00444 <span class="keywordtype">void</span> rt_system_module_init(<span class="keywordtype">void</span>);
<a name="l00445"></a>00445 
<a name="l00451"></a>00451 
<a name="l00452"></a>00452 <span class="comment">/*</span>
<a name="l00453"></a>00453 <span class="comment"> * general kernel service</span>
<a name="l00454"></a>00454 <span class="comment"> */</span>
<a name="l00455"></a>00455 <span class="keywordtype">void</span> rt_kprintf(<span class="keyword">const</span> <span class="keywordtype">char</span> *fmt, ...);
<a name="l00456"></a>00456 <a class="code" href="group__BasicDef.html#gae5c6ccee15f067714ca9c44e509c4047">rt_int32_t</a> rt_vsprintf(<span class="keywordtype">char</span> *dest, <span class="keyword">const</span> <span class="keywordtype">char</span> *format, va_list arg_ptr);
<a name="l00457"></a>00457 <a class="code" href="group__BasicDef.html#gae5c6ccee15f067714ca9c44e509c4047">rt_int32_t</a> rt_sprintf(<span class="keywordtype">char</span> *buf ,<span class="keyword">const</span> <span class="keywordtype">char</span> *format, ...);
<a name="l00458"></a>00458 <a class="code" href="group__BasicDef.html#gae5c6ccee15f067714ca9c44e509c4047">rt_int32_t</a> rt_snprintf(<span class="keywordtype">char</span> *buf, <a class="code" href="group__BasicDef.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a> size, <span class="keyword">const</span> <span class="keywordtype">char</span> *format, ...);
<a name="l00459"></a>00459 
<a name="l00460"></a>00460 <span class="preprocessor">#if defined(RT_USING_DEVICE) &amp;&amp; defined(RT_USING_CONSOLE)</span>
<a name="l00461"></a>00461 <span class="preprocessor"></span>rt_device_t rt_console_set_device(<span class="keyword">const</span> <span class="keywordtype">char</span> *name);
<a name="l00462"></a>00462 rt_device_t rt_console_get_device(<span class="keywordtype">void</span>);
<a name="l00463"></a>00463 <span class="preprocessor">#endif</span>
<a name="l00464"></a>00464 <span class="preprocessor"></span>
<a name="l00465"></a>00465 <a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_get_errno(<span class="keywordtype">void</span>);
<a name="l00466"></a>00466 <span class="keywordtype">void</span> rt_set_errno(<a class="code" href="group__BasicDef.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> no);
<a name="l00467"></a>00467 <span class="keywordtype">int</span> *_rt_errno(<span class="keywordtype">void</span>);
<a name="l00468"></a>00468 <span class="preprocessor">#ifndef RT_USING_NEWLIB</span>
<a name="l00469"></a>00469 <span class="preprocessor"></span><span class="preprocessor">#ifndef errno</span>
<a name="l00470"></a>00470 <span class="preprocessor"></span><span class="preprocessor">#define errno    *_rt_errno()</span>
<a name="l00471"></a>00471 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00472"></a>00472 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00473"></a>00473 <span class="preprocessor"></span>
<a name="l00474"></a>00474 <span class="keywordtype">void</span> *rt_memset(<span class="keywordtype">void</span> *src, <span class="keywordtype">int</span> c, <a class="code" href="group__BasicDef.html#ga958cc0f5d3f7bf59850cd8bd13a4aeb0">rt_ubase_t</a> n);
<a name="l00475"></a>00475 <span class="keywordtype">void</span> *rt_memcpy(<span class="keywordtype">void</span> *dest, <span class="keyword">const</span> <span class="keywordtype">void</span> *src, <a class="code" href="group__BasicDef.html#ga958cc0f5d3f7bf59850cd8bd13a4aeb0">rt_ubase_t</a> n);
<a name="l00476"></a>00476 
<a name="l00477"></a>00477 <a class="code" href="group__BasicDef.html#ga958cc0f5d3f7bf59850cd8bd13a4aeb0">rt_ubase_t</a> rt_strncmp(<span class="keyword">const</span> <span class="keywordtype">char</span> *cs, <span class="keyword">const</span> <span class="keywordtype">char</span> *ct, <a class="code" href="group__BasicDef.html#ga958cc0f5d3f7bf59850cd8bd13a4aeb0">rt_ubase_t</a> count);
<a name="l00478"></a>00478 <a class="code" href="group__BasicDef.html#ga958cc0f5d3f7bf59850cd8bd13a4aeb0">rt_ubase_t</a> rt_strcmp (<span class="keyword">const</span> <span class="keywordtype">char</span> *cs, <span class="keyword">const</span> <span class="keywordtype">char</span> *ct);
<a name="l00479"></a>00479 <a class="code" href="group__BasicDef.html#ga958cc0f5d3f7bf59850cd8bd13a4aeb0">rt_ubase_t</a> rt_strlen (<span class="keyword">const</span> <span class="keywordtype">char</span> *src);
<a name="l00480"></a>00480 <span class="keywordtype">char</span> *rt_strdup(<span class="keyword">const</span> <span class="keywordtype">char</span> *s);
<a name="l00481"></a>00481 
<a name="l00482"></a>00482 <span class="keywordtype">char</span> *rt_strstr(<span class="keyword">const</span> <span class="keywordtype">char</span> *str1, <span class="keyword">const</span> <span class="keywordtype">char</span> *str2);
<a name="l00483"></a>00483 <a class="code" href="group__BasicDef.html#gae5c6ccee15f067714ca9c44e509c4047">rt_int32_t</a> rt_sscanf(<span class="keyword">const</span> <span class="keywordtype">char</span> *buf, <span class="keyword">const</span> <span class="keywordtype">char</span> *fmt, ...);
<a name="l00484"></a>00484 <span class="keywordtype">char</span> *rt_strncpy(<span class="keywordtype">char</span> *dest, <span class="keyword">const</span> <span class="keywordtype">char</span> *src, <a class="code" href="group__BasicDef.html#ga958cc0f5d3f7bf59850cd8bd13a4aeb0">rt_ubase_t</a> n);
<a name="l00485"></a>00485 <span class="keywordtype">void</span> *rt_memmove(<span class="keywordtype">void</span> *dest, <span class="keyword">const</span> <span class="keywordtype">void</span> *src, <a class="code" href="group__BasicDef.html#ga958cc0f5d3f7bf59850cd8bd13a4aeb0">rt_ubase_t</a> n);
<a name="l00486"></a>00486 <a class="code" href="group__BasicDef.html#gae5c6ccee15f067714ca9c44e509c4047">rt_int32_t</a> rt_memcmp(<span class="keyword">const</span> <span class="keywordtype">void</span> *cs, <span class="keyword">const</span> <span class="keywordtype">void</span> *ct, <a class="code" href="group__BasicDef.html#ga958cc0f5d3f7bf59850cd8bd13a4aeb0">rt_ubase_t</a> count);
<a name="l00487"></a>00487 <a class="code" href="group__BasicDef.html#ga909edcac80e5e3f93f63fcebc95922c7">rt_uint32_t</a> rt_strcasecmp(<span class="keyword">const</span> <span class="keywordtype">char</span> *a, <span class="keyword">const</span> <span class="keywordtype">char</span> *b);
<a name="l00488"></a>00488 
<a name="l00489"></a>00489 <span class="keywordtype">void</span> rt_show_version(<span class="keywordtype">void</span>);
<a name="l00490"></a>00490 
<a name="l00493"></a>00493 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00494"></a>00494 <span class="preprocessor"></span>}
<a name="l00495"></a>00495 <span class="preprocessor">#endif</span>
<a name="l00496"></a>00496 <span class="preprocessor"></span>
<a name="l00497"></a>00497 <span class="preprocessor">#endif</span>
</pre></div></div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>全部</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>类</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>文件</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>函数</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>变量</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>枚举</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>枚举值</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&nbsp;</span>宏定义</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address style="text-align: right;"><small>Generated at Thu Dec 26 21:32:02 2013 for EasyIO-GPRS-Framework by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>
